home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 8
/
Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso
/
Aminet
/
util
/
batch
/
chequals.lha
/
CheckQuals
/
CheckQualifiers.doc
< prev
next >
Wrap
Text File
|
1995-04-16
|
2KB
|
79 lines
CheckQualifiers
~~~~~~~~~~~~~~~
Version 1.4
15-Jan-1995
Legal Stuff:
~~~~~~~~~~~~
DISCLAIMER: CHECKQUALIFIERS SOFTWARE IS PROVIDED "AS-IS", NO WARRANTIES OF
ANY KIND ARE MADE. ALL USE IS AT YOUR OWN RISK.
Copyright: Freeware
CheckQualifiers was written on an A4000 with OS 3.1 (V40), but should work
on all 68000 based machines with OS 2.04 (V37) and up.
Description:
~~~~~~~~~~~~
CheckQualifiers is a small CLI utility meant for use in scripts. It checks
if a given set of qualifiers is currently pressed or not and sets its
return code accordingly. There is no output unless you ask for the template
or an error occurs, so a closed cli window will (hopefully) not pop up.
Template:
LSHIFT/S,RSHIFT/S,CAPSLOCK/S,CONTROL/S,LALT/S,RALT/S,LCOMMAND/S,RCOMMAND/S,
MIDBUTTON/S,RIGHTBUTTON/S,LEFTBUTTON/S
Example:
~~~~~~~~
We check for both LSHIFT and LALT. The return code is returned in $rc, as
all good programs should do. If there are more than one IF to react to the
qualifiers, we need to store $rc in one of our variables because IF changes
the contents of $rc.
CheckQualifiers LSHIFT LALT
Echo >ENV:cqrc $rc ; save $rc to $cqrc
IF VAL $cqrc EQ 0
Echo "neither LSHIFT nor LALT"
ENDIF
IF VAL $cqrc EQ 1
Echo "LSHIFT or LALT, but not both"
ENDIF
IF VAL $cqrc EQ 2
Echo "LSHIFT and LALT and something else"
ENDIF
IF VAL $cqrc EQ 3
Echo "LSHIFT and LALT and nothing else"
ENDIF
UnSetEnv cqrc
EQ checks for equality. You can use GT, GE, NOT GT and NOT GE to check for
>, >=, <=, <, respectively.
Author:
~~~~~~~
Thomas Ansorge
Dinkelackerring 55
D-67435 Neustadt an der Weinstraße
Germany
EUROPE
Greetings go to...
~~~~~~~~~~~~~~~~~~
my beta-testers Michael and Stephan,
and all authors, who publish something and do not ask for anything in
return.
Happy checking! Th. :-})